﻿using Gibraltar.Agent;
using System;
using System.Collections.Generic;
using System.Text;

namespace Common.Logging.Loupe
{
    /// <summary>
    /// Provides cleanup utilities that can be called when an application
    /// is finishing or exiting.
    /// </summary>
    public static class LoupeLogUtility
    {
        /// <summary>
        /// Starts the logging session
        /// </summary>
        /// <param name="message">Message for start of session.</param>
        public static void StartSession(string message)
        {
            Log.StartSession(message);
        }

        /// <summary>
        /// Finish the session with a normal status.
        /// </summary>
        /// <param name="message">The reason the session ended.</param>
        public static void EndSessionNormally(string message)
        {
            Log.EndSession(SessionStatus.Normal, message);
        }

        /// <summary>
        /// Finish the session and indicate a crashed status.
        /// </summary>
        /// <param name="message">The reason the session ended.</param>
        public static void EndSessionWithCrashedStatus(string message)
        {
            Log.EndSession(SessionStatus.Crashed, message);
        }
    }
}
